package cn.wolfcode.wms.domain;

import lombok.*;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Getter@Setter@ToString
@AllArgsConstructor@NoArgsConstructor
public class StockIncomeBill extends BaseDomain{
    public static final Integer NO_AUDITED = 1;
    public static final Integer AUDITED = 2;
    private String sn;
    //需转换日期格式的,应在字段上贴此标签,以免SpringMVC不识别
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date vdate;//业务时间
    private Integer status = NO_AUDITED;//默认没有审核
    private BigDecimal totalAmount;
    private BigDecimal totalNumber;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date auditTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date inputTime;
    //关联对象
    private Employee inputUser;//录入人
    private Employee auditor;//审核人
    private Depot depot;
    //包含订单明细
    private List<StockIncomeBillItem> items = new ArrayList();
}
